// 改文件专门用于创建整个应用的路由器
import VueRouter from "vue-router"
// 引入组件
import About from '../pages/About'
import Home from '../pages/Home'
import MyNews from '../pages/MyNews'
import MyMessage from '../pages/MyMessage'
import Detail from '../pages/Detail'

export default new VueRouter({
    routes: [{
            path: '/About',
            component: About
        },
        {
            path: '/Home',
            component: Home,
            children: [{
                    path: 'Message',
                    component: MyMessage,
                    children: [
                        { path: 'Detail', component: Detail }
                    ]
                },
                {
                    path: 'News',
                    component: MyNews
                }
            ]
        }
    ]
})